<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
      /*  function f1(x) {
            x=500;
        }
        var a=250;
        console.log(a);
        f1(a);
        console.log(a);*/

        function Person(name,age) {
            this.name = name;
            this.age = age;
        }
        function f2(x) {
            x.na='alt';
        }
        var p=new Person('ct',18);
      console.log(p);
      f2(p);
      console.log(p);


    </script>
</body>
</html>